package m.jclecai.com.adapter;

import android.content.Context;
import android.view.ViewGroup;

import java.util.List;

import m.jclecai.com.R;
import m.jclecai.com.adapter.base.ViewHolerAdapter;
import m.jclecai.com.adapter.holder.RedPkgDetailHolder;
import m.jclecai.com.bean.AccountParticularsBean;

/**
 * Created by ZD on 2017/6/27.
 */

public class RedPkgDetailAdapter extends ViewHolerAdapter<RedPkgDetailHolder> {
    Context context;
    List<AccountParticularsBean> lists;

    public RedPkgDetailAdapter(Context context, List<AccountParticularsBean> lists) {
        this.context = context;
        this.lists = lists;
    }

    @Override
    public RedPkgDetailHolder onCreateViewHolder(int position, ViewGroup parent) {
        return new RedPkgDetailHolder(context, R.layout.item_red_detail);
    }

    @Override
    public void onBindViewHolder(int position, RedPkgDetailHolder redPkgDetailHolder) {
        redPkgDetailHolder.init(lists.get(position));
    }

    @Override
    public int getCount() {
        return lists.size();
    }
}
